﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.SweptVolume.CApSVInterferenceZoneGateData
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using Tecnomatix.Engineering;


namespace DnProcessSimulateCommands.SweptVolume;

public class CApSVInterferenceZoneGateData
{
  private EApSVInterferenceZoneGateType m_gateType;
  private ITxLocationOperation m_locationOutside;
  private ITxLocationOperation m_locationInside;
  private double m_distance;
  private double m_timeAtOutsideLocation;
  private double m_timeAtZone;
  private ITxLocatableObject m_nearestObject;
  private ITxLocationOperation[] m_unreachedLocations;
  private bool m_insideInterference;

  public CApSVInterferenceZoneGateData(EApSVInterferenceZoneGateType gateType)
  {
    this.m_gateType = gateType;
    this.m_locationOutside = (ITxLocationOperation) null;
    this.m_locationInside = (ITxLocationOperation) null;
    this.m_distance = 0.0;
    this.m_timeAtOutsideLocation = 0.0;
    this.m_timeAtZone = 0.0;
    this.m_unreachedLocations = (ITxLocationOperation[]) null;
    this.m_insideInterference = false;
  }

  public EApSVInterferenceZoneGateType GateType => this.m_gateType;

  public ITxLocationOperation LocationOutside
  {
    get => this.m_locationOutside;
    set => this.m_locationOutside = value;
  }

  public ITxLocationOperation LocationInside
  {
    get => this.m_locationInside;
    set => this.m_locationInside = value;
  }

  public double Distance
  {
    get => this.m_distance;
    set => this.m_distance = value;
  }

  public ITxLocatableObject NearestObject
  {
    get => this.m_nearestObject;
    set => this.m_nearestObject = value;
  }

  public double TimeAtOutsideLocation
  {
    get => this.m_timeAtOutsideLocation;
    set => this.m_timeAtOutsideLocation = value;
  }

  public double TimeAtZone
  {
    get => this.m_timeAtZone;
    set => this.m_timeAtZone = value;
  }

  public ITxLocationOperation[] UnReachedLocations
  {
    get => this.m_unreachedLocations;
    set => this.m_unreachedLocations = value;
  }

  public bool InsideInterference
  {
    get => this.m_insideInterference;
    set => this.m_insideInterference = value;
  }

  public override string ToString()
  {
    string str1 = $"Interference Zone Gate: {this.m_gateType.ToString()}; ";
    if (this.m_locationOutside != null)
      str1 = $"{$"{str1}LocationOutside: {((ITxObject) this.m_locationOutside).Name}; "}Time at LocationOutside: {this.m_timeAtOutsideLocation.ToString()}; ";
    string str2 = $"{str1}Time at Zone: {this.m_timeAtZone.ToString()}; ";
    if (this.m_locationInside != null)
      str2 = $"{str2}LocationInside: {((ITxObject) this.m_locationInside).Name}; ";
    if (this.m_unreachedLocations != null && this.m_unreachedLocations.Length != 0)
    {
      string str3 = str2 + "Unreached Locations: [";
      foreach (ITxLocationOperation unreachedLocation in this.m_unreachedLocations)
        str3 = $"{str3} {((ITxObject) unreachedLocation).Name}";
      str2 = str3 + "];";
    }
    return str2;
  }
}
